import request from '@/utils/request'

// 查询退货售后列表
export function listSale(query) {
  return request({
    url: '/mes/aft/retusale/list',
    method: 'get',
    params: query
  })
}

// 查询退货售后详细
export function getSale(id) {
  return request({
    url: '/mes/aft/retusale/' + id,
    method: 'get'
  })
}

// 新增退货售后
export function addSale(data) {
  return request({
    url: '/mes/aft/retusale',
    method: 'post',
    data: data
  })
}

// 修改退货售后
export function updateSale(data) {
  return request({
    url: '/mes/aft/retusale',
    method: 'put',
    data: data
  })
}

// 删除退货售后
export function delSale(id) {
  return request({
    url: '/mes/aft/retusale/' + id,
    method: 'delete'
  })
}
export function retusaleSync() {
  return request({
    url: '/mes/aft/retusale/sync',
    method: 'get'
  })
}
// 查询电商商品列表
export function listGoods(query) {
  return request({
    url: '/mes/aft/retusale/goods/list',
    method: 'get',
    params: query
  })
}
